<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>系统配置</title>
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
		<link rel="stylesheet" href="./css/frame/font.css">
		<link rel="stylesheet" href="./css/frame/xadmin.css">
		<link rel="stylesheet" href="./css/page/system-manager.css" />
		<script type="text/javascript" src="./lib/jquery/jquery-3.3.1.min.js"></script>
		<script type="text/javascript" src="./lib/layui/layui.js"></script>
		<script type="text/javascript" src="./js/frame/xadmin.js"></script>
		<script type="text/javascript" src="./js/utils/TimeUtils.js"></script>
		<script type="text/javascript" src="./js/constant/urls.js"></script>
	</head>

	<body class="layui-anim layui-anim-up">
		<div class="x-nav">
			<span class="layui-breadcrumb">
				<a href="">首页</a>
				<a href="">系统管理</a>
				<a>
					<cite>系统配置</cite></a>
			</span>
		</div>
		<div class="x-body">
			<button class="layui-btn layui-btn-warm" id="edit">修改配置</button>
			<a class="layui-btn layui-btn-normal" href="javascript:location.replace(location.href);">刷新配置</a>
			<div class="content">
				<p class="item-single is-a"><label>服务器型号：</label><span id="nodeModel"></span></p>
				<p class="item-single is-b"><label>JAVA环境：</label><span id="java"></span></p>
				<p class="item-single is-c"><label>运行环境：</label><span id="running"></span></p>
				<p class="item-single is-d"><label>服务器IP地址：</label><span id="ipAddr"></span></p>
				<p class="item-single is-e"><label>服务器域名：</label><span id="domain"></span></p>
				<p class="item-single is-a"><label>服务版本号：</label><span id="serverModel"></span></p>
				<p class="item-single is-d"><label>数据库版本：</label><span id="dbModel"></span></p>
				<p class="item-single is-f"><label>发布时间：</label><span id="createTime"></span></p>
				<p class="item-single is-e"><label>开发者：</label><span id="developer"></span></p>
				<p class="item-single is-c"><label>联系方式：</label><span id="contactWay"></span></p>
			</div>
		</div>
		<script>
			$(function() {
				$.ajax({
					type: "get",
					url: urls.sysUrl + 'config/last',
					async: true,
					xhrFields: {
						withCredentials: true
					},
					success: function(res) {
						if (res.errorCode === 0) {
							data = res.data;
							$('#nodeModel').html(data.nodeModel);
							$('#java').html(data.java);
							$('#running').html(data.running);
							$('#ipAddr').html(data.ipAddr);
							$('#domain').html(data.domain);
							$('#serverModel').html(data.serverModel);
							$('#dbModel').html(data.dbModel);
							$('#createTime').html(timestampToDateTime(data.createTime));
							$('#developer').html(data.developer);
							$('#contactWay').html(data.contactWay);
						}
					}
				});
				$("#edit").click(function(){
					layer.open({
						type: 2,
						title: '系统信息编辑',
						content: 'system-properties-edit.html',
						area: ['1000px', '600px']
					});
				});
			});
		</script>
	</body>

</html>
